Skip to content

Bluetooth: CAP: Implement unicast to broadcast handover #85642

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Thalley
Copy link
Collaborator

@Thalley Thalley commented Feb 12, 2025

Implement the unicast to broadcast handover procedure,
as per the Bluetooth CAP specificiation.

@Thalley Thalley force-pushed the cap_handover branch 3 times, most recently from 4ef45c7 to ae9d7b8 Compare April 7, 2025 13:14
@Thalley Thalley force-pushed the cap_handover branch 2 times, most recently from b233435 to 3157de2 Compare May 7, 2025 20:51
@Thalley Thalley force-pushed the cap_handover branch 12 times, most recently from dbe3d65 to b9a020b Compare May 23, 2025 16:13
@Thalley Thalley force-pushed the cap_handover branch 3 times, most recently from 096bb4b to d3b48eb Compare May 24, 2025 17:40
@Thalley Thalley requested a review from Copilot May 25, 2025 12:22
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements the handover procedures defined in the Bluetooth CAP specification while also refactoring and unifying unicast group APIs (renaming many bap_ functions to cap_ functions) across tests, host, and sample applications.

  • Replaces manual extended/periodic advertising start calls with a common helper (start_broadcast_adv) in tests.
  • Introduces new CAP unicast group API functions (create, reconfig, add_streams, delete, foreach_stream) with handover support.
  • Updates samples, shell commands, and related configuration to support the new handover procedures.

Reviewed Changes

Copilot reviewed 34 out of 34 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/bsim/bluetooth/audio/src/bap_broadcast_source_test.c Replaces explicit advertising start calls with start_broadcast_adv, consolidating error handling.
tests/bsim/bluetooth/audio/src/bap_bass_broadcaster_test.c Similar consolidation of advertising start logic via start_broadcast_adv.
tests/bluetooth/audio/mocks/src/kernel.c Adds additional fake definitions to support semaphore operations in tests.
tests/bluetooth/audio/cap_initiator/uut/bap_unicast_client.c Implements CAP unicast group API functions with a static unicast group instance.
tests/bluetooth/audio/cap_initiator/src/test_unicast_group.c Adds comprehensive tests for the new CAP unicast group APIs with detailed error cases.
subsys/bluetooth/host/shell/bt.c & adv.c Updates shell commands and adv info reporting to include new extended/periodic advertising states.
subsys/bluetooth/audio/shell/cap_initiator.c Refactors unicast client shell command API calls to use CAP-specific functions.
subsys/bluetooth/audio/cap_internal.h, cap_common.c, cap_commander.c Introduces handover-specific procedure states and helper functions for managing CAP procedures.
subsys/bluetooth/audio/bap_unicast_client.c Updates unicast group validation and adds a foreach_stream iterator with logging.
Kconfig.cap Adds configuration support for CAP handover.
Samples & Include files (cap_initiator.c, cap_initiator_unicast.c, bluetooth.h, cap.h, bap.h, release notes) Updates API usage and documentation to reflect CAP handover and API renaming.

@Thalley Thalley force-pushed the cap_handover branch 2 times, most recently from 13c8c0f to b51c9c8 Compare June 11, 2025 13:21
@Thalley Thalley force-pushed the cap_handover branch 6 times, most recently from 0a0ce24 to 7ce8999 Compare June 19, 2025 10:26
@Thalley Thalley changed the title Bluetooth: CAP: Implement handover procedures Bluetooth: CAP: Implement unicast to broadcast handover Jul 2, 2025
Implement the unicast to broadcast handover procedure,
as per the Bluetooth CAP specificiation.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Copy link

sonarqubecloud bot commented Jul 2, 2025

@aescolar aescolar assigned Thalley and unassigned aescolar Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In Review
Development

Successfully merging this pull request may close these issues.

2 participants